import React, { Component } from 'react'
import guyan0 from '../../assets/images/guyan0.png'
import './index.css'
import { withRouter } from 'react-router-dom'

class Girl extends Component {
    state = {
        guyan:'guyan'
    }
    render() {
        const { woman } = this.props
        return (
            <div className="girl-container">
                <div className="sex">
                    <div>女生小说</div>
                    <div className="woman-icon">
                        <i className="iconfont iconnvsheng"></i>
                    </div>
                    <div></div>
                </div>
                <div className="list">
                    <ul className="list-content">
                        {
                           woman.map((item,index) =>{
                               return (
                                    <li key={item.id}  onClick={this.goBookClass(item.id)}>
                                        <div className="book-pic">
                                            <p>{item.name}</p>
                                            <p>
                                                <img src={guyan0} alt="" />
                                            </p>
                                        </div>
                                        <div className="book-sum">{item.count}本书籍</div>
                                    </li>
                               )
                           }) 
                        }
                          
                    </ul>
                </div>
            </div>
        )
    }

    goBookClass = (id) =>{
        return () =>{
             this.props.history.push('/bookcalss',{id:id})
        }
    }
    
}
export default  withRouter(Girl)